package com.dong.ui.util;

import javax.swing.*;
import java.awt.*;

/**
 * @description:
 * @author: 陈瑞东
 * @create: 2021-08-24 16:18
 */
public class FontUtils {

    public static final Font TITLE_FONT = new Font("宋体", Font.BOLD, 30);
    public static final Font NORMAL_FONT = new Font("宋体", Font.PLAIN, 20);

    public static void setUIFont()
    {
        Font f = NORMAL_FONT;
        String   names[]={ "Label", "CheckBox", "PopupMenu","MenuItem", "CheckBoxMenuItem",
                "JRadioButtonMenuItem","ComboBox", "Button", "Tree", "ScrollPane",
                "TabbedPane", "EditorPane", "TitledBorder", "Menu", "TextArea",
                "OptionPane", "MenuBar", "ToolBar", "ToggleButton", "ToolTip",
                "ProgressBar", "TableHeader", "Panel", "List", "ColorChooser",
                "PasswordField","TextField", "Table", "Label", "Viewport",
                "RadioButtonMenuItem","RadioButton", "DesktopPane", "InternalFrame"
        };
        for (String item : names) {
            UIManager.put(item+ ".font",f);
        }
    }
}
